<?php
print "<div class=\"subpage_col_right\">";

$pages = get_pages(array(
	'order' => '`page_id` ASC'
));
foreach($pages->items as $page) {
?>
			<div class="subpage_menu <?php if (is_page($page->get_slug()))  ?>"><?php $page->the_permalink(); ?></div>
           
<?php } ?>
<?php
$categories = get_categories(array(
	'order' => '`category_post_amount` DESC',
	'having' => '`category_post_amount` > 0'
));

if ($categories->total > 0) {
	foreach($categories->items as $category) {
?>
			<div class="subpage_menu"><?php $category->the_permalink(); ?> (<?php $category->the_post_amount(); ?>)</div>
<?php
	}
}
?>			
            
<?php
print "</div>";

print "<div class=\"block_divine\">&nbsp;</div>";

$website = get_option('website');
$install_path = get_option('install_path');
$website_path = $website.$install_path;

?>	  
    
     <div class="sub_page_bottom">

     <div class="page_bottom_logo"><a href="gnotometrics.com"><img src="<?php print $website_path; ?>theme/images/logo_otometrics.png" /></a></div>
 
     </div>
     <!-- thepage End-->
    </div>
	
    <!-- pagetop_wrap END-->
    </div>




</center>


</body>
</html>
